package de.justphil.tcg.tcgserver.commons.domain.wrappers;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;

import de.justphil.tcg.tcgserver.commons.domain.CardInstance;

@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public class ShallowCardInstance {
	
	@XmlElement
	private long id;
	
	@XmlElement(name = "lat")
	@JsonSerialize(include = Inclusion.NON_DEFAULT)
	private double latitude;
	
	@XmlElement(name = "lon")
	@JsonSerialize(include = Inclusion.NON_DEFAULT)
	private double longitude;
	
	@XmlElement
	private long card;
	
	public ShallowCardInstance() {
		// JAXB conformity
	}
	
	public ShallowCardInstance( CardInstance ci ) {
		this(ci.getId(), ci.getLatitude(), ci.getLongitude(), ci.getCardId());
	}

	public ShallowCardInstance(long id, double latitude, double longitude,
			long card) {
		super();
		this.id = id;
		this.latitude = latitude;
		this.longitude = longitude;
		this.card = card;
	}
	
	/* ######################################################################## */
	/* ######################################################################## */
	/* ######################################################################## */

	public long getId() {
		return id;
	}

	public double getLatitude() {
		return latitude;
	}

	public double getLongitude() {
		return longitude;
	}

	public long getCard() {
		return card;
	}
	
	
	
	
	

}
